add file to combobox c#

59

add file to combobox c# -

var folder = new DirectoryInfo(folderPath);
var files = folder.GetFiles("*.pdf");

myComboBox.DisplayMember = "Name";
myComboBox.ValueMember = "FullName";
myComboBox.DataSource = files;
myComboBox.SelectedItem = null;

Comments

Submit
0 Comments